package com.shy.portal.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.shy.base.entity.BaseEntity;

/**
 * <p>
 * Title: UserRole
 * </p>
 * <p>
 * Description: 用户角色關係實体
 * </p>
 * <p>
 * Company:
 * </p>
 * 
 * @author H2013788
 */
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "portal_user_role")
public class UserRole extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 外鍵
     */
    @ManyToOne
    @JoinColumn(name = "role_id")
    private Role role;

    /**
     * 外鍵
     */
    @ManyToOne
    @JoinColumn(name = "user_id")
    private User user;

    /**
     * 描述
     */
    @Column(name = "description")
    private String description;

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

  

}
